< previous page page_347 next page >

Page 347
LISTING 15.1.CONTINUED
9f8044bafea36a1f728739c0bb58ef4c.gif
78:     If argMsg = eBusinessRules.CheckDepositAmount Then
79:     'This method can handle the message
80:         Raise vbObjectError +  eBusinessRuleViolations.DepositLimitExceed, _
81:             DepositFunds:deposit Method, _
82:             Govt limit for cash deposits exceeded. Please fill out  Cash Deposit Record
83:     End If
84: End Sub
85: Private Sub enforceBusinessRules(argMsg As Integer)
86:     If argMsg = eBusinessRules.CheckDepositAmount Then
87:     'This method can handle the message
88:         Raise vbObjectError +  eBusinessRuleViolations.DepositLimitExceed, _
89:             Govt limit for cash deposits exceeded. Please fill out  Cash Deposit Record
90:     End If
91: End Sub
92: 'The CashDepositRecord class
93: Private mvartheForm As Object 'local copy
94: Private theForm As frmCashDepositRecord
95: Friend Property Set theForm(ByVal vData As Object)
96: 'used when assigning an Object to the property, on the left side of  a Set statement.
97: 'Syntax: Set x.theForm = Form1
98:     Set mvartheForm = vData
99: End Property
100: Friend Property Get theForm() As Object
101: 'used when retrieving value of a property, on the right side  of an assignment.
102: 'Syntax: Debug.Print X.theForm
103:     Set theForm = mvartheForm
104: End Property
105: Public Sub showForm()
106:     theForm.Show
107: End Sub
108: Public Sub printInfo()
109: End Sub
110: #End If
111: Public Function exceedsLimit(argTransObject As Deposit) As Boolean
112:     If argTransObject.Amount > 10000 Then
113:         If theAppTransactions.pTransLogIsOn Then
114:             theAppTransactions.addTrans2Text _
115:                 Deposit amount for account  _
116:                 & argTransObject.AccountID _
117:                 &  exceeded government limit
118:         End If
119:         theErrorHandler.handleErrors argTransObject, V _
120:             eBusinessRules.CheckDepositAmount
121:         showForm
122:     End If
continues

 
< previous page page_347 next page >

If you like this book, buy it!